package com.yuxi.al.single;

/**
 * Created by yuxi on 2017/8/27.
 */
public class InnerSingle {
    public static void main(String[] args) {
        InSingle single1 = InSingle.getInstance();
        InSingle single2 = InSingle.getInstance();
        System.out.println(single1.equals(single2));
    }
}

class InSingle {
    static class Handler {
        private static InSingle single = new InSingle();
    }

    private InSingle() {
    }

    public static InSingle getInstance() {
        return Handler.single;
    }
}
